-- GENERATED SPELL FOR [Wyrmkin Firebrand] --


function spell0_1049(pUnit, Event) --@Fireball Volley,n/a--
pUnit:FullCastSpellOnTarget(17203,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1049', 3000, 1)
end

function spell1_1049(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(20754,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1049', 9000, 1)
end

function spell2_1049(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(17195,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1049', 1500, 1)
end

function spell3_1049(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1049', 3000, 1)
end

function Sorts_1049(pUnit, Event)
local choix_sorts_1049 = math.random(0, 3)
if choix_sorts_1049 == 0 then
pUnit:RegisterEvent('spell0_1049', 1, 1)
end
if choix_sorts_1049 == 1 then
pUnit:RegisterEvent('spell1_1049', 1, 1)
end
if choix_sorts_1049 == 2 then
pUnit:RegisterEvent('spell2_1049', 1, 1)
end
if choix_sorts_1049 == 3 then
pUnit:RegisterEvent('spell3_1049', 1, 1)
end
end

function mob1049_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1049', math.random(1500, 3000), 1)
end

function mob1049_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1049_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1049_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1049, 1, 'mob1049_Action')
RegisterUnitEvent(1049, 2, 'mob1049_Leave')
RegisterUnitEvent(1049, 3, 'mob1049_Kill')
RegisterUnitEvent(1049, 4, 'mob1049_Die')
